//
//  PBCollectionHomeCell.m
//  PBHomeDemo
//
//  Created by Playboy on 2017/12/10.
//  Copyright © 2017年 tmkj. All rights reserved.
//

#import "PBCollectionHomeCell.h"

@interface PBCollectionHomeCell ()
@property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *bigLabel;
@property (weak, nonatomic) IBOutlet UILabel *typeLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;


@end

@implementation PBCollectionHomeCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)refreshWithModel:(PBBestHomeModel *)model {
    [self.coverImageView sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:nil];
    self.nameLabel.text = model.name;
    self.bigLabel.text = [NSString stringWithFormat:@"%@ %@平米",model.type,model.area];
    if (model.entireRent == 1) {
        self.typeLabel.text = @"整租";
    }else {
        self.typeLabel.text = @"合租";
    }
    self.priceLabel.text = [NSString stringWithFormat:@"%@元/月",model.rent];
}

@end
